<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>订单管理</title>
	<link rel="stylesheet" href="/Shopping/Public/Css/admin.css"/>
</head>
<body>
	<div id="header">
		<div class="top">
			<ul>
				<li><a href="<?php echo U('Login/loginOut');?>">❤退出❤</a></li>
				<li style="">欢迎您!<?php echo ($_SESSION['admin']['username']); ?></li>
			</ul>
		</div>
		<div class="h_main">
			<span>购物商城后台管理系统</span>
		</div>
	</div>
	<div id="middle"></div>
	<div class="main mt">
		<div class="m_left fl">
			<ul>
				<a href="<?php echo U('Goods/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>商品管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('Cate/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>分类管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('User/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>用户管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('Order/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>订单管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('Comments/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>评论管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('Adver/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>广告管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
			</ul>
		</div>
	<div class="m_right fr">
		<div class="mright_m">
		
	<div class="agoods_nav">
		<span>订单列表</span>
	</div>
	
	<table class="table" border="1" cellspacing="0" cellpadding="5" align="center">
		<tr bgcolor="#ccc">
			<th>编号</th>
			<th>订单编号</th>
			<th>买家</th>
			<th>收货人</th>
			<th>收货地址</th>
			<th>联系电话</th>
			<th>是否付款</th>
			<th>是否收货</th>
			<th>操作</th>
		</tr>
		<?php if(is_array($list)): foreach($list as $key=>$val): ?><tr>
				<td><?php echo ($val['olid']); ?></td>
				<td><?php echo ($val['olo']); ?></td>
				<td><?php echo ($val['uname']); ?></td>
				<td><?php echo ($val['adre']); ?></td>
				<td><?php echo ($val['adad']); ?></td>
				<td><?php echo ($val['adtel']); ?></td>
				<td width="80px;">
					<?php if($val['olpay'] == 1): ?><button style="width:60px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">已付款</button>
					<?php else: ?>
					<button style="width:60px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">未付款</button><?php endif; ?>
				</td>
				<td width="80px;">
					<?php switch($val["olde"]): case "0": ?><a href="<?php echo U('Order/fa',['id'=>$val[olid],'p'=>$p]);?>"><button style="width:60px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">发货</button></a><?php break;?>
						<?php case "1": ?><button style="width:60px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">未收货</button><?php break;?>
						<?php case "2": ?><button style="width:60px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">已收货</button><?php break; endswitch;?>
				</td>
				<td width="80"><a href="<?php echo U('Order/detail',['id'=>$val['olid']]);?>" style="color:#000;display:block">查看详情</a><a href="<?php echo U('Order/del',['id'=>$val['olid']]);?>" style="color:#000;display:block">删除</a></td>	
				</tr><?php endforeach; endif; ?>
			<tr>
				<th colspan="9">
				 	<?php echo ($page); ?>
				</th>
			</tr>
		</table>

		</div>
	</div>
</div>
<div class="clear"></div>
<div id="middle"></div>
<div id="footer">
	<p>Copyright&copy; 2016年 京ICP备11011334号</p>
</div>

</body>
</html>